package main

import (
	"gitee.com/baizhige/go-server-tempalte/common/config"
	"gitee.com/baizhige/go-server-tempalte/common/log"
	"gitee.com/baizhige/go-server-tempalte/common/mongo"
	"gitee.com/baizhige/go-server-tempalte/common/redis"
	"gitee.com/baizhige/go-server-tempalte/common/router"
)

func main() {
	config.Init("project2")                           //初始化配置文件
	log.Init(config.Project.App.LogLevel)             //初始化日志级别
	mongo.Init(config.Project.Mongo)                  // 初始化Mongo 连接、索引、插件
	redis.Init(config.Project.Redis)                  //初始化redis
	router.ListenWeb(config.Project.App.Port, Router) //初始化http请求监听，中间件
}
